package com.zyp.test.test;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by zyp on 2017/9/28.
 */

public class AngleRect extends View {

    private  int mPathWidth;
    private  int mPathLength;
    private  Paint mPaint;
    private Canvas mCanvas;

    public AngleRect(Context context) {
        super(context);
        initView(context);
    }
    public AngleRect(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }
    private void initView(Context context){
        mPathWidth = DensityUtil.dip2px(context,5);
        mPathLength = DensityUtil.dip2px(context,20);
        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mPaint.setColor(Color.RED);
        mPaint.setStrokeWidth(mPathWidth);
        mPaint.setDither(true);
        mCanvas = new Canvas();
        Rect rect = new Rect();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        
    }
}
